package cn.genmer.test.security.designpatterns.observer.myobserver;

import cn.genmer.test.security.designpatterns.observer.Observer;

public class HeFengObserver implements Observer {

    private double temperature;
    private double presure;
    private double humidity;
    @Override
    public void update(double temperature, double presure, double humidity) {
        this.temperature = temperature;
        this.presure = presure;
        this.humidity = humidity;
        display();
    }

    public void display(){
        System.out.println(String.format("[和风天气]今天的温度为%s， 气压：%s, 湿度：%s", temperature, presure,humidity));
    }
}
